<section class="Hui-container">
	<div class="Hui-wraper">	
		<div id="a-employment">		
			<h2>工作经历</h2>
			<h5>*是必填信息</h5>
			<div class="line"></div>
			<br>
			<form method="post" action="{:U('Aemployment/save')}" id="employment_form" class="form form-horizontal responsive">	
				<div class="row cl">
					<label class="form-label col-xs-3">*总工作经验(月)：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="4" placeholder="请填写你的总工作时间" name="total_months" id="total_months" datatype="integer" nullmsg="如果没有任何工作经验，请填写0">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<h4>工作经历1</h4>			
				
				<div class="row cl">
					<label class="form-label col-xs-3">公司名称：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="employer1" id="employer1" datatype="en-ch" ignore="ignore">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>			
				<div class="row cl">
					<label class="form-label col-xs-3">职务：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="title1" id="title1" ignore="ignore" datatype="en-ch" >
					</div>
					<div class="col-xs-5"> </div>
				</div>
					<br>
				<div class="row cl">				
					<label class="form-label col-xs-3">任职时长(月)：</label>
					<div class="formControls col-xs-4"> 				
						<input type="text" class="input-text" maxlength="3" name="duration1" id="duration1" ignore="ignore" datatype="integer">		
					</div>
					<div class="col-xs-5"> </div>				
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">这是你目前任职的公司吗？</label>
					<div class="formControls ">
						<div class="radio-box col-xs-my">
							<input type="radio" id="current1-1" ignore="ignore" name="current1" value="1">
							<label for="current1-1">是</label>
						</div>
						<div class="radio-box col-xs-my">
							<input type="radio" id="current1-2" ignore="ignore" name="current1" value="2">
							<label for="current1-2">否</label>
						</div>			
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">年薪（包括奖金）：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="7" placeholder="人民币" ignore="ignore" name="salary1" id="salary1" datatype="integer">
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>
				<h4>工作经历2</h4>			
				
				<div class="row cl">
					<label class="form-label col-xs-3">公司名称：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="employer2" id="employer2" datatype="en-ch" ignore="ignore">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>			
				<div class="row cl">
					<label class="form-label col-xs-3">职务：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="title2" id="title2" ignore="ignore" datatype="en-ch" >
					</div>
					<div class="col-xs-5"> </div>
				</div>
					<br>
				<div class="row cl">				
					<label class="form-label col-xs-3">任职时长(月)：</label>
					<div class="formControls col-xs-4"> 				
						<input type="text" class="input-text" maxlength="3" name="duration2" id="duration2" ignore="ignore" datatype="integer">		
					</div>
					<div class="col-xs-5"> </div>				
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">这是你目前任职的公司吗？</label>
					<div class="formControls">
						<div class="radio-box col-xs-my">
							<input type="radio" id="current2-1" ignore="ignore" name="current2" value="1">
							<label for="current2-1">是</label>
						</div>
						<div class="radio-box col-xs-my">
							<input type="radio" id="current2-2" ignore="ignore" name="current2" value="2">
							<label for="current2-2">否</label>
						</div>			
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">年薪（包括奖金）：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="7" placeholder="人民币" ignore="ignore" name="salary2" id="salary2" datatype="integer">
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>
				<h4>工作经历3</h4>			
				
				<div class="row cl">
					<label class="form-label col-xs-3">公司名称：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="employer3" id="employer3" datatype="en-ch" ignore="ignore">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>			
				<div class="row cl">
					<label class="form-label col-xs-3">职务：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" maxlength="50" name="title3" id="title3" ignore="ignore" datatype="en-ch" >
					</div>
					<div class="col-xs-5"> </div>
				</div>
					<br>
				<div class="row cl">				
					<label class="form-label col-xs-3">任职时长(月)：</label>
					<div class="formControls col-xs-4"> 				
						<input type="text" class="input-text" maxlength="3" name="duration3" id="duration3" ignore="ignore" datatype="integer">		
					</div>
					<div class="col-xs-5"> </div>				
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">这是你目前任职的公司吗？</label>
					<div class="formControls">
						<div class="radio-box col-xs-my">
							<input type="radio" id="current3-1" ignore="ignore" name="current3" value="1">
							<label for="current3-1">是</label>
						</div>
						<div class="radio-box col-xs-my">
							<input type="radio" id="current3-2" ignore="ignore" name="current3" value="2">
							<label for="current3-2">否</label>
						</div>			
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>
				<div class="row cl">
					<label class="form-label col-xs-3">年薪（包括奖金）：</label>
					<div class="formControls col-xs-4">
						<input type="text" class="input-text" placeholder="人民币" ignore="ignore" name="salary3" id="salary3" maxlength="7" datatype="integer">
					</div>
					<div class="col-xs-5"> </div>
				</div>				
				<br>			
				<div class="row cl">
					<div class="col-xs-10 col-xs-offset-3">
						<a href="{:U('Aeducation/index')}" class="btn btn-warning radius previous_form">上一步</a>
						<input class="btn btn-primary" type="submit" value="&nbsp;&nbsp;保存&下一步&nbsp;&nbsp;">
					</div>
				</div>
			</form>		
		</div>
	</div>
</section>

<script>
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#employment_form").Validform({
		tiptype:2
	});
	var obj1 = document.getElementsByName('current1');
	for(i = 0; i < obj1.length; i++){  
	    if(obj1[i].value =="{$data.current1}") 
	        obj1[i].checked = true;       
	}
	var obj2 = document.getElementsByName('current2');
	for(i = 0; i < obj2.length; i++){  
	    if(obj2[i].value =="{$data.current2}") 
	        obj2[i].checked = true;       
	}
	var obj3 = document.getElementsByName('current3');
	for(i = 0; i < obj3.length; i++){  
	    if(obj3[i].value =="{$data.current3}") 
	        obj3[i].checked = true;       
	}
	document.getElementById('total_months').value="{$data.total_months}";
	document.getElementById('employer1').value="{$data.employer1}";
	document.getElementById('title1').value="{$data.title1}";
	document.getElementById('employer2').value="{$data.employer2}";
	document.getElementById('title2').value="{$data.title2}";
	document.getElementById('employer3').value="{$data.employer3}";
	document.getElementById('title3').value="{$data.title3}";
	if("{$data.salary3}">0)
		 document.getElementById('salary3').value="{$data.salary3}";
	if("{$data.duration3}">0)
		 document.getElementById('duration3').value="{$data.duration3}";
	if("{$data.salary2}">0)
		 document.getElementById('salary2').value="{$data.salary2}";
	if("{$data.duration2}">0)
		 document.getElementById('duration2').value="{$data.duration2}";
	if("{$data.salary1}">0)
		 document.getElementById('salary1').value="{$data.salary1}";
	if("{$data.duration1}">0)
		 document.getElementById('duration1').value="{$data.duration1}";
});
</script>	
		